/*
 * @Author: lijing
 * @e-mail: 1413979079@qq.com
 * @LastEditors: lijing
 * @Date: 2020-05-03 10:10:32
 * @LastEditTime: 2020-06-25 22:52:29
 * @FilePath: \client\src\model\UserInfo.ts
 * @Description: 用户信息
 */
export default class UserInfo {
  public id: number;
  public createdAt: string;
  public username: string;
  public name: string;
  public avatarUrl: string;
  public static create(user: any): UserInfo {
    const res = new UserInfo();
    res.id = user.id;
    res.createdAt = user.created_at;
    res.username = user.username;
    res.name = user.name;
    res.avatarUrl = user.avatar_url;
    return res;
  }
}
